<html>
<head><meta charset="utf-8"><title>ui/underscore-lifetime/dyn-trait-underscore.rs · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html">ui/underscore-lifetime/dyn-trait-underscore.rs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="127383722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127383722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127383722">(May 31 2018 at 21:08)</a>:</h4>
<p>but <span class="user-mention" data-user-id="116107">@David Wood</span> let's continue here =)</p>



<a name="127383730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127383730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127383730">(May 31 2018 at 21:08)</a>:</h4>
<p>Sure.</p>



<a name="127383734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127383734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127383734">(May 31 2018 at 21:08)</a>:</h4>
<p>anyway I ran locally</p>



<a name="127383756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127383756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127383756">(May 31 2018 at 21:09)</a>:</h4>
<p>do you know how to render those graphviz files as visible graphs?</p>



<a name="127383760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127383760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127383760">(May 31 2018 at 21:09)</a>:</h4>
<p>I usually do <code>dot -T svg foo.dot &gt; foo.svg</code> and open it in a browser</p>



<a name="127383842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127383842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127383842">(May 31 2018 at 21:10)</a>:</h4>
<p>Yeah, I've done that before.</p>



<a name="127383914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127383914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127383914">(May 31 2018 at 21:12)</a>:</h4>
<p>ok so anyway I'm looking at the graph now</p>



<a name="127383937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127383937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127383937">(May 31 2018 at 21:13)</a>:</h4>
<p>however</p>



<a name="127383942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127383942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127383942">(May 31 2018 at 21:13)</a>:</h4>
<p>it doesn't make it so easy to correlate with the file ;)</p>



<a name="127384090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384090">(May 31 2018 at 21:16)</a>:</h4>
<p>ok so <span class="user-mention" data-user-id="116107">@David Wood</span> this is my theory :)</p>



<a name="127384094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384094">(May 31 2018 at 21:16)</a>:</h4>
<p>region constraints can come from a lot of places <em>but</em></p>



<a name="127384124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384124">(May 31 2018 at 21:17)</a>:</h4>
<p>I think that it is helpful to distinguish those that arise from putting types "in tension" with one another — that's my term for it anyway. For example, if you do this: <code>x = y</code>, then you require that <code>typeof(y) &lt;: typeof(x)</code></p>



<a name="127384131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384131">(May 31 2018 at 21:17)</a>:</h4>
<p>I am calling <code>y</code> and <code>x</code> "in tension" there</p>



<a name="127384141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384141">(May 31 2018 at 21:17)</a>:</h4>
<p>in contrast, if you do <code>let x: T = y</code>, then we require that <code>typeof(x) = T</code>, which is not...</p>



<a name="127384191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384191">(May 31 2018 at 21:18)</a>:</h4>
<p>so anyway I sort of think we should be able to select — when type-checking — likely places like assignments that relate regions</p>



<a name="127384201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384201">(May 31 2018 at 21:18)</a>:</h4>
<p>well, I have to think about this some more :)</p>



<a name="127384204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384204">(May 31 2018 at 21:18)</a>:</h4>
<p>I had worked through some examples in the old regionck</p>



<a name="127384208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384208">(May 31 2018 at 21:18)</a>:</h4>
<p>I have to think how it relates to the new one</p>



<a name="127384238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384238">(May 31 2018 at 21:19)</a>:</h4>
<p>Sure thing, that makes sense so far.</p>



<a name="127384239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384239">(May 31 2018 at 21:19)</a>:</h4>
<p>I guess the TL;DR is I wodner if there is loower hanging fruit :)</p>



<a name="127384283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384283">(May 31 2018 at 21:20)</a>:</h4>
<p>but I'd sort of like to sit down with someone (maybe you! :) and talk this through</p>



<a name="127384289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384289">(May 31 2018 at 21:20)</a>:</h4>
<p>and see if we can find some heuristics we like</p>



<a name="127384295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384295">(May 31 2018 at 21:20)</a>:</h4>
<p>I guess to start we can add some causal information to the outlives, we are definitely going to need it</p>



<a name="127384297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384297">(May 31 2018 at 21:20)</a>:</h4>
<p>but maybe it's worth asking:</p>



<a name="127384298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384298">(May 31 2018 at 21:20)</a>:</h4>
<p>what would we <em>like</em> this error to look like anyway?</p>



<a name="127384313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384313">(May 31 2018 at 21:21)</a>:</h4>
<p>Yeah, that would probably help narrow down what all information we need to make it happen.</p>



<a name="127384316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384316">(May 31 2018 at 21:21)</a>:</h4>
<p>yeah that's usually how I start ...</p>



<a name="127384379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384379">(May 31 2018 at 21:23)</a>:</h4>
<p>I'm a bit torn here</p>



<a name="127384514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384514">(May 31 2018 at 21:26)</a>:</h4>
<p>I think my ideal message would be quite something like:</p>
<div class="codehilite"><pre><span></span>error[E0495]: `dyn` type can only capture static references
  --&gt; dyn-trait-underscore.rs:18:20
   |
16 |   fn a&lt;T&gt;(items: &amp;[T]) -&gt; Box&lt;dyn Iterator&lt;Item=&amp;T&gt;&gt; {
   |                               ^^^^^^^^^^^^^^^^^^^^^ this `dyn` type has no bound and can only capture static references
...
18 |     Box::new(items.iter())
                  ------------ but non-static data flows into it from here
   = suggestion: try adding a bound
16 |   fn a&lt;T&gt;(items: &amp;[T]) -&gt; Box&lt;dyn Iterator&lt;Item=&amp;T&gt; + &#39;_&gt; {
</pre></div>



<a name="127384519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384519">(May 31 2018 at 21:26)</a>:</h4>
<p>obviously that's pretty tailored to this case</p>



<a name="127384522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384522">(May 31 2018 at 21:26)</a>:</h4>
<p>but that's kind of how I want the errors to look ;)</p>



<a name="127384523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384523">(May 31 2018 at 21:26)</a>:</h4>
<p>otoh, that seems like "future work" potentially :)</p>



<a name="127384541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384541">(May 31 2018 at 21:27)</a>:</h4>
<p>it'd be interesting to look at some cases that are not about <code>dyn</code></p>



<a name="127384553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384553">(May 31 2018 at 21:27)</a>:</h4>
<p>still, I can imagine doing this without <em>that</em> much difficulty</p>



<a name="127384554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384554">(May 31 2018 at 21:27)</a>:</h4>
<p>or at least something <em>like</em> it</p>



<a name="127384611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384611">(May 31 2018 at 21:28)</a>:</h4>
<div class="codehilite"><pre><span></span>error[E0495]: `dyn` type can only capture static references
  --&gt; dyn-trait-underscore.rs:18:20
   |
16 |   fn a&lt;T&gt;(items: &amp;[T]) -&gt; Box&lt;dyn Iterator&lt;Item=&amp;T&gt;&gt; {
   |                               ^^^^^^^^^^^^^^^^^^^^^ this `dyn` type has a `&#39;static` bound
...
18 |     Box::new(items.iter())
                  ------------ but non-static data flows into it from here
</pre></div>



<a name="127384615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384615">(May 31 2018 at 21:28)</a>:</h4>
<p>something like that might be quite doable</p>



<a name="127384620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384620">(May 31 2018 at 21:28)</a>:</h4>
<p>without undue changes</p>



<a name="127384628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384628">(May 31 2018 at 21:29)</a>:</h4>
<p>we'd have to track <em>enough</em> to know that the relationship to <code>'static</code> derives from a <code>dyn</code>-type lifetime bound</p>



<a name="127384635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384635">(May 31 2018 at 21:29)</a>:</h4>
<p>and the parameter passing from <code>items.iter()</code> is what introduces the non-static (<code>'1</code>) free lifetime</p>



<a name="127384641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384641">(May 31 2018 at 21:29)</a>:</h4>
<p>the latter I think is fairly easy to do — we'd tag parameter passing as one of those "tension points" I was talking about</p>



<a name="127384646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384646">(May 31 2018 at 21:29)</a>:</h4>
<p>the former is a bit trickier, because that involves bridging some of the "older" region code</p>



<a name="127384694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384694">(May 31 2018 at 21:30)</a>:</h4>
<p>but it definitely knows</p>



<a name="127384705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384705">(May 31 2018 at 21:30)</a>:</h4>
<p>actually...</p>



<a name="127384708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384708">(May 31 2018 at 21:30)</a>:</h4>
<p>I think that comes from the casting code...</p>



<a name="127384724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384724">(May 31 2018 at 21:31)</a>:</h4>
<p>ah well I think requirement derives from <a href="https://github.com/rust-lang/rust/blob/5342d40c1f49ef82ebff4c30fdad9f3b6fd339c1/src/librustc_mir/borrow_check/nll/type_check/mod.rs#L1378-L1386" target="_blank" title="https://github.com/rust-lang/rust/blob/5342d40c1f49ef82ebff4c30fdad9f3b6fd339c1/src/librustc_mir/borrow_check/nll/type_check/mod.rs#L1378-L1386">the unsize cast</a>,</p>



<a name="127384784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384784">(May 31 2018 at 21:32)</a>:</h4>
<p>and then <a href="https://github.com/rust-lang/rust/blob/5342d40c1f49ef82ebff4c30fdad9f3b6fd339c1/src/librustc/traits/select.rs#L2976-L2979" target="_blank" title="https://github.com/rust-lang/rust/blob/5342d40c1f49ef82ebff4c30fdad9f3b6fd339c1/src/librustc/traits/select.rs#L2976-L2979">from here in the traits code</a></p>



<a name="127384785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384785">(May 31 2018 at 21:32)</a>:</h4>
<p>so yeah not entirely trivial but doable</p>



<a name="127384798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384798">(May 31 2018 at 21:33)</a>:</h4>
<p>I think that this test was the only one that wasn't quite solved by the original issue-46983 PR - at least, it's the only one that I've found and seen mentioned in spreadsheets/paper docs against this issue.</p>



<a name="127384805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384805">(May 31 2018 at 21:33)</a>:</h4>
<p>which PR is that?</p>



<a name="127384815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384815">(May 31 2018 at 21:33)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/47329" target="_blank" title="https://github.com/rust-lang/rust/pull/47329">https://github.com/rust-lang/rust/pull/47329</a></p>



<a name="127384862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384862">(May 31 2018 at 21:34)</a>:</h4>
<p>I had forgotten about that...</p>



<a name="127384874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384874">(May 31 2018 at 21:34)</a>:</h4>
<p>(that's why I originally was in the issue-46983 topic as <span class="user-mention" data-user-id="116083">@pnkfelix</span> had commented in that issue that this test was an example that needed fixed)</p>



<a name="127384875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384875">(May 31 2018 at 21:34)</a>:</h4>
<p>so I suspect we could do this without modifying the traits code</p>



<a name="127384884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384884">(May 31 2018 at 21:35)</a>:</h4>
<p>if we setup the "cause" appropriately -- i.e., use a cause that indicates this is a "unsizing cast"</p>



<a name="127384894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384894">(May 31 2018 at 21:35)</a>:</h4>
<p>and then extract that out for the ultimate <code>outlives</code> obligation</p>



<a name="127384944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384944">(May 31 2018 at 21:36)</a>:</h4>
<p>this in short is kind of the strategy I wanted to employ: we add causal information, but sparsely, driven by test cases, and only for "significant points" we can explain to a user</p>



<a name="127384948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384948">(May 31 2018 at 21:36)</a>:</h4>
<p>then when we display errors we can kind of look for things that lie along the path</p>



<a name="127384959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384959">(May 31 2018 at 21:37)</a>:</h4>
<p>which have causal information</p>



<a name="127384971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384971">(May 31 2018 at 21:37)</a>:</h4>
<p>as a step in that direction, we might just kind of dump out the causal information like the current checker does, and gradually make it more 'fluent"</p>



<a name="127384982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384982">(May 31 2018 at 21:37)</a>:</h4>
<p>I gotta run now but we could discuss in more depth tomorrow ;)</p>



<a name="127384987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127384987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127384987">(May 31 2018 at 21:38)</a>:</h4>
<p>Sounds good, getting late here anyway.</p>



<a name="127414682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127414682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127414682">(Jun 01 2018 at 12:48)</a>:</h4>
<p>If you want to chat about this, I'm around. I could also do some experimenting here, I wasn't sure how clearly I was able to communicate yesterday.</p>



<a name="127415867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127415867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127415867">(Jun 01 2018 at 13:20)</a>:</h4>
<p>I'll be around in a few hours, at work just now.</p>



<a name="127430791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127430791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127430791">(Jun 01 2018 at 18:35)</a>:</h4>
<p>Might not have time to chat about this today, my day is running on a bit. If you have some thoughts and want to dump them here than I can take a look when I've got a moment.</p>



<a name="127430809"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127430809" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127430809">(Jun 01 2018 at 18:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> ok</p>



<a name="127430813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127430813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127430813">(Jun 01 2018 at 18:35)</a>:</h4>
<p>I may do a bit of hacking, but doing other things right now, so prob not (looking at perf)</p>



<a name="127430854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127430854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127430854">(Jun 01 2018 at 18:36)</a>:</h4>
<p>if I do, I'll push a branch somewhere and leave a few notes</p>



<a name="127430861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127430861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127430861">(Jun 01 2018 at 18:36)</a>:</h4>
<p>Sounds good.</p>



<a name="127542847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127542847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127542847">(Jun 04 2018 at 12:38)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Had a chance to look into this at all?</p>



<a name="127542850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127542850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127542850">(Jun 04 2018 at 12:38)</a>:</h4>
<p>Actually, I was literally just making a branch to do some experimentation for a bit this morning</p>



<a name="127542856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127542856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127542856">(Jun 04 2018 at 12:38)</a>:</h4>
<p>so no :)</p>



<a name="127542915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127542915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127542915">(Jun 04 2018 at 12:40)</a>:</h4>
<p>I was thinking of extending <code>Locations</code> to track causal information</p>



<a name="127542936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127542936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127542936">(Jun 04 2018 at 12:41)</a>:</h4>
<p>that reminds me that I really ought to try and land <a href="https://github.com/rust-lang/rust/pull/50938" target="_blank" title="https://github.com/rust-lang/rust/pull/50938">https://github.com/rust-lang/rust/pull/50938</a> at some point, as it simplifies <code>Locations</code></p>



<a name="127542947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127542947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127542947">(Jun 04 2018 at 12:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> do you think you'd have time later today? (I presume you're working now)</p>



<a name="127542989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127542989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127542989">(Jun 04 2018 at 12:42)</a>:</h4>
<p>I'd be interested in scheduling a time to do some pair experimentation</p>



<a name="127543132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127543132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127543132">(Jun 04 2018 at 12:47)</a>:</h4>
<p>I reckon I should. It's 1.45pm here, I'll probably be available around 6.00pm for a while.</p>



<a name="127543564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127543564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127543564">(Jun 04 2018 at 12:59)</a>:</h4>
<p>ok I realize that today I may be busy actually — have to see</p>



<a name="127543569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127543569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127543569">(Jun 04 2018 at 12:59)</a>:</h4>
<p>but I'll poke a bit this morning and maybe see if I can leave some notes for you to pick up</p>



<a name="127543639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127543639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127543639">(Jun 04 2018 at 13:00)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="thumbs up">:thumbs_up:</span></p>



<a name="127552875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127552875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127552875">(Jun 04 2018 at 16:20)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> I'm almost to the point of adding in some kind of very simple causal info; I'll push to a branch in a second</p>



<a name="127552881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127552881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127552881">(Jun 04 2018 at 16:21)</a>:</h4>
<p>naturally got distracted by various things...</p>



<a name="127552887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127552887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127552887">(Jun 04 2018 at 16:21)</a>:</h4>
<p>I'm hoping to render a graph soon showing it and see if we can figure out something from it :)</p>



<a name="127552986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127552986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127552986">(Jun 04 2018 at 16:23)</a>:</h4>
<p>Great, just got in so I can have a look at it when you push.</p>



<a name="127553116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127553116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127553116">(Jun 04 2018 at 16:26)</a>:</h4>
<p>ok, the branch is <code>nll-borrow-diagnostics</code> on my repository</p>



<a name="127553119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127553119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127553119">(Jun 04 2018 at 16:26)</a>:</h4>
<p>I am still building locally though</p>



<a name="127553134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127553134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127553134">(Jun 04 2018 at 16:26)</a>:</h4>
<p>the last commit is sloppy and mixes two things ;) but otherwise should be simple enough</p>



<a name="127553674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127553674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127553674">(Jun 04 2018 at 16:38)</a>:</h4>
<p>ok, well, I got the imagine :) it's definitely still going to take some refinement</p>



<a name="127553677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127553677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127553677">(Jun 04 2018 at 16:38)</a>:</h4>
<p><a href="/user_uploads/4715/i3FXms5GZU4XHbO5xRxakpMQ/Screen-Shot-2018-06-04-at-12.39.05-PM.png" target="_blank" title="Screen-Shot-2018-06-04-at-12.39.05-PM.png">Screen-Shot-2018-06-04-at-12.39.05-PM.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/i3FXms5GZU4XHbO5xRxakpMQ/Screen-Shot-2018-06-04-at-12.39.05-PM.png" target="_blank" title="Screen-Shot-2018-06-04-at-12.39.05-PM.png"><img src="/user_uploads/4715/i3FXms5GZU4XHbO5xRxakpMQ/Screen-Shot-2018-06-04-at-12.39.05-PM.png"></a></div>



<a name="127553679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127553679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127553679">(Jun 04 2018 at 16:38)</a>:</h4>
<p>basically way too much interesting stuff :) I have to look more closely at theMIR</p>



<a name="127553682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127553682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127553682">(Jun 04 2018 at 16:39)</a>:</h4>
<p>but it's a start...</p>



<a name="127553687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127553687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127553687">(Jun 04 2018 at 16:39)</a>:</h4>
<p>I gotta run but I'll be online-ish</p>



<a name="127566338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127566338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127566338">(Jun 04 2018 at 21:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> still around?</p>



<a name="127566850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127566850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127566850">(Jun 04 2018 at 21:17)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yeah.</p>



<a name="127569783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127569783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127569783">(Jun 04 2018 at 22:25)</a>:</h4>
<p>sorry, I left shortly before you wrote that :) back online for a bit</p>



<a name="127569787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127569787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127569787">(Jun 04 2018 at 22:25)</a>:</h4>
<p>not sure if you got a chance to take a look at that branch :)</p>



<a name="127569794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127569794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127569794">(Jun 04 2018 at 22:25)</a>:</h4>
<p>I had a glance through it, made some sense.</p>



<a name="127592265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127592265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127592265">(Jun 05 2018 at 10:13)</a>:</h4>
<p>I tweaked the "interesting" criteria and now I think the set of edges is looking pretty good.</p>



<a name="127592271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127592271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127592271">(Jun 05 2018 at 10:13)</a>:</h4>
<p>we still have to do a bit more refinement but it's basically pulling out the interesting spots...</p>



<a name="127601604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127601604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127601604">(Jun 05 2018 at 13:55)</a>:</h4>
<p><a href="https://gist.github.com/nikomatsakis/30729457b235586e31f5a975e3338ed3" target="_blank" title="https://gist.github.com/nikomatsakis/30729457b235586e31f5a975e3338ed3">you can see the SVG here</a></p>



<a name="127601986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127601986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127601986">(Jun 05 2018 at 14:02)</a>:</h4>
<p>Nice - is there anything I can be doing related to this? This seems to be blocking my looking into #46983 (which is the topic this branched off from).</p>



<a name="127603903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127603903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127603903">(Jun 05 2018 at 14:39)</a>:</h4>
<p>a good question :) I would definitely like to collaborate. i'm not sure the best way to set it up. Roughly what I had in mind is this:</p>
<p>1. the rough categorization of interesting vs boring is good, but to do better, we need to inspect the actions a bit more deeply. I think it's probably best to do this lazilly — arguably, the interesting vs boring categorization could wait entirely and be done lazilly, actually, but I suspect it's useful to have the ability to thread a bit of information down this way for later.<br>
    - in this case, the "interesting" cases boil down to <code>Box::new</code> and the various casts<br>
    - I think we can rule out <code>Box::new</code> as 'interesting' because it has a signature that is just taking the lifetime it gets as argument and propagating it to the return value; this is not something we have to highlight for the user<br>
2. so basically I imagine a "general" output that kind of shows which regions have to be equal to <code>'static</code> (we hsould discuss how to do that) and then highlights the interesting points in the MIR to show <em>why</em></p>



<a name="127603943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127603943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127603943">(Jun 05 2018 at 14:40)</a>:</h4>
<p>one thought I have is that we could still do a pair session maybe to go over this live, but I'm happy to try async</p>



<a name="127604683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127604683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127604683">(Jun 05 2018 at 14:55)</a>:</h4>
<p>I'm happy to have a live session to look into it if we can work out a time.</p>



<a name="127604695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127604695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127604695">(Jun 05 2018 at 14:55)</a>:</h4>
<p>Otherwise I just need pointed at something to work on and perhaps some pointers on what it should do/a starting point.</p>



<a name="127604769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127604769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127604769">(Jun 05 2018 at 14:57)</a>:</h4>
<blockquote>
<p>I'm happy to have a live session to look into it if we can work out a time.</p>
</blockquote>
<p>yeah that's the tricky part :)</p>



<a name="127604777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127604777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127604777">(Jun 05 2018 at 14:57)</a>:</h4>
<p>I'm actually free-ish this afternoon</p>



<a name="127604779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127604779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127604779">(Jun 05 2018 at 14:57)</a>:</h4>
<p>(my time zone)</p>



<a name="127604784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127604784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127604784">(Jun 05 2018 at 14:57)</a>:</h4>
<p>not sure what time you become available</p>



<a name="127604997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127604997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127604997">(Jun 05 2018 at 15:01)</a>:</h4>
<p>Around the same as yesterday, two-to-three hours from now, roughly (and onwards from that).</p>



<a name="127607209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127607209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127607209">(Jun 05 2018 at 15:49)</a>:</h4>
<p>great, ping me</p>



<a name="127612935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127612935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127612935">(Jun 05 2018 at 17:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> around just now.</p>



<a name="127618357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127618357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127618357">(Jun 05 2018 at 19:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> argh I missed this! are you around after the meeting or is that too crazy late for you</p>



<a name="127618367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127618367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127618367">(Jun 05 2018 at 19:40)</a>:</h4>
<p>I'm still around.</p>



<a name="127618377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127618377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127618377">(Jun 05 2018 at 19:40)</a>:</h4>
<p>ok, I am free after this</p>



<a name="127620951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127620951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127620951">(Jun 05 2018 at 20:29)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> want to chat a bit then ?</p>



<a name="127620958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127620958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127620958">(Jun 05 2018 at 20:29)</a>:</h4>
<p>Sure.</p>



<a name="127621031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127621031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127621031">(Jun 05 2018 at 20:30)</a>:</h4>
<p><a href="https://appear.in/i-heart-rust" target="_blank" title="https://appear.in/i-heart-rust">https://appear.in/i-heart-rust</a></p>



<a name="127623058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623058">(Jun 05 2018 at 21:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> that was helpful, I'll start looking into that, could you gist the file with the rough outline that you worked together?</p>



<a name="127623064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623064">(Jun 05 2018 at 21:13)</a>:</h4>
<p>yep!</p>



<a name="127623108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623108">(Jun 05 2018 at 21:14)</a>:</h4>
<p><a href="https://gist.github.com/nikomatsakis/257ec66494a1fb2b0d5cde44ad24f1ce" target="_blank" title="https://gist.github.com/nikomatsakis/257ec66494a1fb2b0d5cde44ad24f1ce">https://gist.github.com/nikomatsakis/257ec66494a1fb2b0d5cde44ad24f1ce</a></p>



<a name="127623118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623118">(Jun 05 2018 at 21:14)</a>:</h4>
<p>what is the issue # again... <span class="user-mention" data-user-id="116083">@pnkfelix</span> what was the issue that covered "nice region errors"?</p>



<a name="127623129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623129">(Jun 05 2018 at 21:14)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/46983" target="_blank" title="https://github.com/rust-lang/rust/issues/46983">https://github.com/rust-lang/rust/issues/46983</a> ?</p>



<a name="127623151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623151">(Jun 05 2018 at 21:15)</a>:</h4>
<p>You mentioned <code>nice_region_error</code>related code in the original mentoring instructions.</p>



<a name="127623208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623208">(Jun 05 2018 at 21:16)</a>:</h4>
<p>that seems like a decent one to use I guess</p>



<a name="127623212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623212">(Jun 05 2018 at 21:16)</a>:</h4>
<p>I think there are a bunch of issues that kind of cover this point</p>



<a name="127623229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623229">(Jun 05 2018 at 21:17)</a>:</h4>
<p>ok, i'm encoding the video now</p>



<a name="127623231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623231">(Jun 05 2018 at 21:17)</a>:</h4>
<p>that...takes a while</p>



<a name="127623234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623234">(Jun 05 2018 at 21:17)</a>:</h4>
<p>~30 minutes claims the encoder :)</p>



<a name="127623288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623288">(Jun 05 2018 at 21:18)</a>:</h4>
<p>I doubt I'll properly dig in till tomorrow so it'll be done no doubt for me to refresh my memory with then.</p>



<a name="127623365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623365">(Jun 05 2018 at 21:20)</a>:</h4>
<p>+1</p>



<a name="127623371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623371">(Jun 05 2018 at 21:20)</a>:</h4>
<p>I realized I never posted the other one we made</p>



<a name="127623374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623374">(Jun 05 2018 at 21:20)</a>:</h4>
<p>forgot even what we talked about</p>



<a name="127623382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623382">(Jun 05 2018 at 21:20)</a>:</h4>
<p>I'll have to see if I still have the video file somewhere :)</p>



<a name="127623420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623420">(Jun 05 2018 at 21:22)</a>:</h4>
<p>I think we were looking at that function that was slow, ended up leading to the DFS change.</p>



<a name="127623467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623467">(Jun 05 2018 at 21:22)</a>:</h4>
<p>I realize that "that function that was slow" doesn't really narrow it down.</p>



<a name="127623479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623479">(Jun 05 2018 at 21:22)</a>:</h4>
<p>oh yes I recall</p>



<a name="127623486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623486">(Jun 05 2018 at 21:23)</a>:</h4>
<p>well, that worked</p>



<a name="127623487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127623487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127623487">(Jun 05 2018 at 21:23)</a>:</h4>
<p>:)</p>



<a name="127705239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705239">(Jun 07 2018 at 09:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> a question regarding our previous discussion: </p>
<p><a href="https://github.com/rust-lang/rust/blob/27ede55414e01f13c6869a8763da207e544cc6ad/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L1008-L1019" target="_blank" title="https://github.com/rust-lang/rust/blob/27ede55414e01f13c6869a8763da207e544cc6ad/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L1008-L1019">This is where</a> the error we're seeing at present is reported. I imagine for the purposes of testing that I'll make an error at this point that has all the labels of interesting spots and so on. </p>
<p>I also think I understand roughly what the function that produces a <code>ConstraintCategory</code> will look like and similar with the ordering of those. </p>
<p>What I've not quite been able to figure out is how to glue all that together - am I right in thinking that I'd want to look at all the constraints that are relevant to the given function, consider only those that are interesting (based on your branch from earlier in the week) and for each of those find the <code>ConstraintCategory</code> - which will then be sorted and their spans labelled?</p>



<a name="127705292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705292">(Jun 07 2018 at 09:06)</a>:</h4>
<p>PS, first things first: you ought to move that code into its own module</p>



<a name="127705298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705298">(Jun 07 2018 at 09:06)</a>:</h4>
<p>traditionally called <code>error_reporting.rs</code></p>



<a name="127705306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705306">(Jun 07 2018 at 09:06)</a>:</h4>
<p>Cool, I can do that.</p>



<a name="127705317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705317">(Jun 07 2018 at 09:07)</a>:</h4>
<p>I think what you want to do is probably similar to what <code>blame_span</code> does</p>



<a name="127705322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705322">(Jun 07 2018 at 09:07)</a>:</h4>
<p>basically, to do a depth-first search over the graph of constraints</p>



<a name="127705339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705339">(Jun 07 2018 at 09:07)</a>:</h4>
<p>er, <code>dependencies</code> is the one that actually <a href="https://github.com/rust-lang/rust/blob/27ede55414e01f13c6869a8763da207e544cc6ad/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L1058-L1065" target="_blank" title="https://github.com/rust-lang/rust/blob/27ede55414e01f13c6869a8763da207e544cc6ad/src/librustc_mir/borrow_check/nll/region_infer/mod.rs#L1058-L1065">does the search</a> right now</p>



<a name="127705385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705385">(Jun 07 2018 at 09:08)</a>:</h4>
<p>but basically I imagined (a) getting a <em>path</em> through the graph</p>



<a name="127705389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705389">(Jun 07 2018 at 09:08)</a>:</h4>
<p>I suppose there could be multiple,</p>



<a name="127705395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705395">(Jun 07 2018 at 09:08)</a>:</h4>
<p>we can arbitrarily take the shortest one to make our lives easier...</p>



<a name="127705424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705424">(Jun 07 2018 at 09:09)</a>:</h4>
<p>well, <code>dependencies</code> is doing a kind of BFS</p>



<a name="127705433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705433">(Jun 07 2018 at 09:09)</a>:</h4>
<p>or a really inefficient version of a BFS ;)</p>



<a name="127705440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705440">(Jun 07 2018 at 09:09)</a>:</h4>
<p>but anyway I had imagined getting some kind of path (maybe a vec of paths, but let's start with one)</p>



<a name="127705446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705446">(Jun 07 2018 at 09:10)</a>:</h4>
<p>and then converting each edge on that path to a category</p>



<a name="127705492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705492">(Jun 07 2018 at 09:10)</a>:</h4>
<p>(for this purpose, you can ignore the uninterested ones, yes)</p>



<a name="127705499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705499">(Jun 07 2018 at 09:10)</a>:</h4>
<p>thus giving us a reduced vector of "categories"</p>



<a name="127705505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705505">(Jun 07 2018 at 09:10)</a>:</h4>
<p>so we go from <code>Vec&lt;ConstraintIndex&gt;</code> (the full path) to <code>Vec&lt;Category&gt;</code> (a shorter list of constraints)</p>



<a name="127705519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705519">(Jun 07 2018 at 09:10)</a>:</h4>
<p>then we can (a) find what looks like the best entry to call the "primary" span, and (b) issues labels for the rest</p>



<a name="127705529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705529">(Jun 07 2018 at 09:11)</a>:</h4>
<p>Alright, that makes sense.</p>



<a name="127705604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705604">(Jun 07 2018 at 09:12)</a>:</h4>
<p>actually a BFS (a true BFS) probably <em>does</em> make sense though</p>



<a name="127705609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705609">(Jun 07 2018 at 09:12)</a>:</h4>
<p>in the sense that it will find you a shortest path to start</p>



<a name="127705636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705636">(Jun 07 2018 at 09:13)</a>:</h4>
<p>otoh it's more of a pain to extract the path...</p>



<a name="127705637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705637">(Jun 07 2018 at 09:13)</a>:</h4>
<p>/me shrugs</p>



<a name="127705642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705642">(Jun 07 2018 at 09:13)</a>:</h4>
<p>the graph isn't that big so it shouldn't really matter that much</p>



<a name="127705646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705646">(Jun 07 2018 at 09:13)</a>:</h4>
<p>and it's only in the case of error</p>



<a name="127705662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705662">(Jun 07 2018 at 09:13)</a>:</h4>
<blockquote>
<p>the graph isn't that big so it shouldn't really matter that much</p>
</blockquote>
<p>"famous last words" if ever I heard them</p>



<a name="127705715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127705715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127705715">(Jun 07 2018 at 09:14)</a>:</h4>
<p><em>anyway</em> we can tweak that part later... =)</p>



<a name="127771886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127771886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127771886">(Jun 08 2018 at 13:27)</a>:</h4>
<p>did you get a chance to look at this, <span class="user-mention" data-user-id="116107">@David Wood</span>? (just curious)</p>



<a name="127771972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127771972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127771972">(Jun 08 2018 at 13:29)</a>:</h4>
<p>I've only had a chance to dig around the existing code a little - intend to start on it tonight.</p>



<a name="127922525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127922525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127922525">(Jun 11 2018 at 22:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> not had as much time to work on this as I'd have liked - but I've got <a href="https://github.com/davidtwco/rust/tree/nll-dyn-trait-underscore-error-improvements" target="_blank" title="https://github.com/davidtwco/rust/tree/nll-dyn-trait-underscore-error-improvements">the following branch so far</a> - it has the BFS through the graph to find the paths and it then filters out the boring constraints. I still need to categorize and sort but I am not anticipating that being too bad.</p>



<a name="127927569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127927569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127927569">(Jun 12 2018 at 00:26)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> cool! I'll take a look</p>



<a name="127970919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/127970919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#127970919">(Jun 12 2018 at 19:45)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Made some more progress - now doing the categorization (albeit, poorly), sorting and emitting an error with labels. It looks pretty similar to what we drafted in the gist during our chat with lots of labelled points like "Cast" and so on.</p>
<p>The categorization however, is pretty poor, I'll need some guidance there on what categories should exist and how to work them out - right now I've got three and when I categorize my constraints I get "Cast" for each one..</p>



<a name="128011311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128011311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128011311">(Jun 13 2018 at 14:28)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Would you prefer I open a WIP PR with the above?</p>



<a name="128011602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128011602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128011602">(Jun 13 2018 at 14:34)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> yeah, that'd be great</p>



<a name="128011679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128011679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128011679">(Jun 13 2018 at 14:36)</a>:</h4>
<p>this week is tough because of Moz All Hands; I skimmed the branch but...</p>



<a name="128013222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128013222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128013222">(Jun 13 2018 at 15:08)</a>:</h4>
<p>That's fine, forgot it was All Hands week. <span class="emoji emoji-1f44d" title="thumbs up">:thumbs_up:</span></p>



<a name="128013817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128013817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128013817">(Jun 13 2018 at 15:20)</a>:</h4>
<p>Submitted it as <a href="https://github.com/rust-lang/rust/pull/51536" target="_blank" title="https://github.com/rust-lang/rust/pull/51536">#51536</a> for next week.</p>



<a name="128248204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128248204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128248204">(Jun 18 2018 at 14:05)</a>:</h4>
<blockquote>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Made some more progress - now doing the categorization (albeit, poorly), sorting and emitting an error with labels. It looks pretty similar to what we drafted in the gist during our chat with lots of labelled points like "Cast" and so on.</p>
<p>The categorization however, is pretty poor, I'll need some guidance there on what categories should exist and how to work them out - right now I've got three and when I categorize my constraints I get "Cast" for each one..</p>
</blockquote>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Whenever you've got some time, could you take a look at this?</p>



<a name="128251373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128251373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128251373">(Jun 18 2018 at 15:02)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> definitely, sorry about last week</p>



<a name="128251409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128251409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128251409">(Jun 18 2018 at 15:03)</a>:</h4>
<p>No worries.</p>



<a name="128318882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128318882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128318882">(Jun 19 2018 at 18:27)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> hey, I'm talking about your branch with <span class="user-mention" data-user-id="116083">@pnkfelix</span> now — did we have some place where we were taking notes?</p>



<a name="128318886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128318886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128318886">(Jun 19 2018 at 18:27)</a>:</h4>
<p>I can't remember :)</p>



<a name="128318897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128318897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128318897">(Jun 19 2018 at 18:27)</a>:</h4>
<p>I don't think so - other than the text file that we used when pair programming. At least, not that I recall.</p>



<a name="128319077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128319077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128319077">(Jun 19 2018 at 18:30)</a>:</h4>
<p>ok, thanks</p>



<a name="128319085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128319085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128319085">(Jun 19 2018 at 18:30)</a>:</h4>
<p>I found this, which was my sketch of "vaguely" the error I hoped we could produce</p>
<div class="codehilite"><pre><span></span>error[E0495]: this data would have to have static lifetime
  --&gt; dyn-trait-underscore.rs:18:20
   |
16 |   fn a&lt;T&gt;(items: &amp;[T]) -&gt; Box&lt;dyn Iterator&lt;Item=&amp;T&gt;&gt; {
   |                  ---- fully elaborated type is `&amp;&#39;1 [T]`
18 |       Box::new(items.iter())
   |       ^^^^^^^^^^^^^^^^^^^^^^ casting this value to a `dyn Iterator` requires `&#39;1` to outlive `&#39;static`
19 |  }
</pre></div>



<a name="128319413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128319413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128319413">(Jun 19 2018 at 18:36)</a>:</h4>
<p>Yeah. Right now, all I've got is the traversal of the constraints where we find a path, then filtering out interesting and boring constraints based on your work, then a very poor attempt at categorization, then sorting, then labelling. Like this example from the gist, but a bit worse:</p>
<div class="codehilite"><pre><span></span>error[E0495]: this data would have to have static lifetime
  --&gt; dyn-trait-underscore.rs:18:20
   |
16 |   fn a&lt;T&gt;(items: &amp;[T]) -&gt; Box&lt;dyn Iterator&lt;Item=&amp;T&gt;&gt; {
   |                  ---- SourceArgument
18 |       Box::new(items.iter())
   |       ^^^^^^^^^^^^^^^^^^^^^^ InterestingSpot(Cast)
   |       |
   |       call to box
19 | }
</pre></div>



<a name="128319546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128319546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128319546">(Jun 19 2018 at 18:39)</a>:</h4>
<p>let me read ...</p>



<a name="128378148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128378148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128378148">(Jun 20 2018 at 19:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> ping?</p>



<a name="128378964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128378964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128378964">(Jun 20 2018 at 19:31)</a>:</h4>
<p>I <a href="https://github.com/rust-lang/rust/pull/51536#pullrequestreview-130109766" target="_blank" title="https://github.com/rust-lang/rust/pull/51536#pullrequestreview-130109766">left a review here</a>, the TL;DR being that it looks good ...</p>



<a name="128379226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128379226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128379226">(Jun 20 2018 at 19:37)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> pong</p>



<a name="128379254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128379254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128379254">(Jun 20 2018 at 19:38)</a>:</h4>
<p>hey, just wanted to talk about next steps</p>



<a name="128379292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128379292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128379292">(Jun 20 2018 at 19:38)</a>:</h4>
<p>Sounds good</p>



<a name="128379315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128379315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128379315">(Jun 20 2018 at 19:39)</a>:</h4>
<p>Just taking a look at the review.</p>



<a name="128386771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128386771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128386771">(Jun 20 2018 at 22:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> addressed the review comments and rebased that branch.</p>



<a name="128425422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128425422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128425422">(Jun 21 2018 at 16:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> great! However, I'm still confused, does it not affect the output of any tests yet?</p>



<a name="128425423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128425423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128425423">(Jun 21 2018 at 16:08)</a>:</h4>
<p>What do you think we need to do to land it?</p>



<a name="128425464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128425464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128425464">(Jun 21 2018 at 16:08)</a>:</h4>
<p>I'm trying to decide what's a good MVP</p>



<a name="128425477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128425477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128425477">(Jun 21 2018 at 16:08)</a>:</h4>
<p>I've modified the it to show spans and their categories for whatever tests that part of the code normally handles.</p>



<a name="128425497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128425497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128425497">(Jun 21 2018 at 16:09)</a>:</h4>
<p>That's useless as an actual diagnostic but it is useful to debug the categorization.</p>



<a name="128425501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128425501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128425501">(Jun 21 2018 at 16:09)</a>:</h4>
<p>hmm ok let me read your latest commits more carefully</p>



<a name="128425587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128425587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128425587">(Jun 21 2018 at 16:10)</a>:</h4>
<p>I'd like to get some feedback on the categorization - I think it's pretty poor so far, but the skeleton is there. You can scroll through the Travis output to see what it labels some spans as in tests that it affects.</p>



<a name="128425599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128425599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128425599">(Jun 21 2018 at 16:11)</a>:</h4>
<p>After that we need to work out how we want to use those categories in making diagnostics.</p>



<a name="128425695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128425695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128425695">(Jun 21 2018 at 16:13)</a>:</h4>
<p>ok :)</p>



<a name="128425704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128425704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128425704">(Jun 21 2018 at 16:13)</a>:</h4>
<p>After our initial chat to plan the work, I think we decided that our first steps were just going to be categorization of interesting constraints, so I've not thought much past that.</p>



<a name="128426477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128426477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128426477">(Jun 21 2018 at 16:30)</a>:</h4>
<blockquote>
<p>After our initial chat to plan the work, I think we decided that our first steps were just going to be categorization of interesting constraints, so I've not thought much past that.</p>
</blockquote>
<p>yes</p>



<a name="128426482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128426482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128426482">(Jun 21 2018 at 16:30)</a>:</h4>
<p>ok so let me browse the travis errors</p>



<a name="128477158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128477158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128477158">(Jun 22 2018 at 15:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Any chance you could take a look at this before the weekend so I've got enough to keep me busy? No worries if you can't.</p>



<a name="128593057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128593057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128593057">(Jun 25 2018 at 10:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> ping when you've got some time to chat about next steps for this.</p>



<a name="128615043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615043">(Jun 25 2018 at 18:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> let's find a time</p>



<a name="128615047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615047">(Jun 25 2018 at 18:25)</a>:</h4>
<p>I'm around now-ish and should be around this week</p>



<a name="128615092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615092">(Jun 25 2018 at 18:26)</a>:</h4>
<p>it'd prob be helpful for me to schedule a time for us to chat (on zulip is prob fine) just to help me focus :)</p>



<a name="128615731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615731">(Jun 25 2018 at 18:38)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I'm around just now.</p>



<a name="128615735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615735">(Jun 25 2018 at 18:38)</a>:</h4>
<p>ah, cool</p>



<a name="128615748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615748">(Jun 25 2018 at 18:39)</a>:</h4>
<p>ok so I guess the question is to figure out the next steps</p>



<a name="128615756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615756">(Jun 25 2018 at 18:39)</a>:</h4>
<p>I am very interesting in getting this to a MVP we can land</p>



<a name="128615758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615758">(Jun 25 2018 at 18:39)</a>:</h4>
<p>to some extent</p>



<a name="128615761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615761">(Jun 25 2018 at 18:39)</a>:</h4>
<p>the current messages are so bad</p>



<a name="128615763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615763">(Jun 25 2018 at 18:39)</a>:</h4>
<p>that it seems like we could land just about anything ;)</p>



<a name="128615774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615774">(Jun 25 2018 at 18:39)</a>:</h4>
<p>that said, I should get a local build going</p>



<a name="128615778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615778">(Jun 25 2018 at 18:39)</a>:</h4>
<p>it's hard to get a feeling for what's happening from the travis output</p>



<a name="128615855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615855">(Jun 25 2018 at 18:41)</a>:</h4>
<p>Right now I think the categorization needs improvement - but I'm not sure how to go about doing that (what categories we need, what we consider to be in what category). And then I'm not sure how we plan to use these categories in creating diagnostics.</p>



<a name="128615908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615908">(Jun 25 2018 at 18:42)</a>:</h4>
<p>ok so</p>



<a name="128615909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615909">(Jun 25 2018 at 18:42)</a>:</h4>
<p>it seems like there are a few things we could work on, yeah</p>



<a name="128615911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615911">(Jun 25 2018 at 18:42)</a>:</h4>
<p>one is improving categories</p>



<a name="128615912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615912">(Jun 25 2018 at 18:42)</a>:</h4>
<p>the other is the labels</p>



<a name="128615913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615913">(Jun 25 2018 at 18:42)</a>:</h4>
<p>my inclination is</p>



<a name="128615915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615915">(Jun 25 2018 at 18:42)</a>:</h4>
<p>that we should focus less on <em>narrowing down</em> the relevant points</p>



<a name="128615918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615918">(Jun 25 2018 at 18:42)</a>:</h4>
<p>and more on how to format them</p>



<a name="128615923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615923">(Jun 25 2018 at 18:42)</a>:</h4>
<p>i.e., we could land something first that adds too many labels</p>



<a name="128615925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615925">(Jun 25 2018 at 18:42)</a>:</h4>
<p>and then work on paring them down</p>



<a name="128615935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128615935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128615935">(Jun 25 2018 at 18:43)</a>:</h4>
<p>I've got a local build of your branch going now, though it'll be a bit because this partcular directory has to rebuild LLVM</p>



<a name="128616016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616016">(Jun 25 2018 at 18:45)</a>:</h4>
<p>let me review again what you had</p>



<a name="128616023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616023">(Jun 25 2018 at 18:45)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="gi">+/// Constraints that are considered interesting can be categorized to</span>
<span class="gi">+/// determine why they are interesting.</span>
<span class="gi">+#[derive(Debug, Eq, PartialEq, PartialOrd, Ord)]</span>
<span class="gi">+enum ConstraintCategory {</span>
<span class="gi">+    Assignment,</span>
<span class="gi">+    Cast,</span>
<span class="gi">+    CallArgument,</span>
<span class="gi">+    Other,</span>
<span class="gi">+}</span>
</pre></div>



<a name="128616070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616070">(Jun 25 2018 at 18:46)</a>:</h4>
<p>I figured that there could probably be more categories.</p>



<a name="128616071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616071">(Jun 25 2018 at 18:46)</a>:</h4>
<p>I wonder if the "interesting" vs "not interersting" bit is really worth it</p>



<a name="128616072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616072">(Jun 25 2018 at 18:46)</a>:</h4>
<p>versus rolling everything into categories</p>



<a name="128616077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616077">(Jun 25 2018 at 18:46)</a>:</h4>
<p>it feels like two ways of getting at the same thing</p>



<a name="128616088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616088">(Jun 25 2018 at 18:47)</a>:</h4>
<p>in partcular, of those, I am nervous about "assignment"</p>



<a name="128616091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616091">(Jun 25 2018 at 18:47)</a>:</h4>
<p>Well, wasn't that so that we didn't label a span for a compiler-inserted temporary? My understanding was that was what was mostly being filtered out as boring.</p>



<a name="128616093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616093">(Jun 25 2018 at 18:47)</a>:</h4>
<p>because it seems to me that many assignments will be assignments into temporaries</p>



<a name="128616097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616097">(Jun 25 2018 at 18:47)</a>:</h4>
<p>that the user doesn't think of as assignments</p>



<a name="128616101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616101">(Jun 25 2018 at 18:47)</a>:</h4>
<blockquote>
<p>Well, wasn't that so that we didn't label a span for a compiler-inserted temporary? My understanding was that was what was mostly being filtered out as boring.</p>
</blockquote>
<p>well, my point is that we could do that filtering by mapping to a <code>None</code> category</p>



<a name="128616105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616105">(Jun 25 2018 at 18:47)</a>:</h4>
<p>which I guess you don't have here</p>



<a name="128616108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616108">(Jun 25 2018 at 18:47)</a>:</h4>
<p>or to <code>Other</code></p>



<a name="128616112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616112">(Jun 25 2018 at 18:47)</a>:</h4>
<p>or <code>Boring</code> or something =)</p>



<a name="128616154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616154">(Jun 25 2018 at 18:48)</a>:</h4>
<p>Ah, I see, yeah, we could do that too.</p>



<a name="128616160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616160">(Jun 25 2018 at 18:48)</a>:</h4>
<p>we should also probably identify assignments to <code>_0</code>, which is the return slot</p>



<a name="128616198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616198">(Jun 25 2018 at 18:49)</a>:</h4>
<p>I think for a first draft we could create the following categories:</p>
<ul>
<li>call</li>
<li>returned (assignment into <code>_0</code>)</li>
<li>assignment to user variable</li>
<li>other</li>
</ul>



<a name="128616201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616201">(Jun 25 2018 at 18:49)</a>:</h4>
<p>which is basically what you have</p>



<a name="128616204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616204">(Jun 25 2018 at 18:49)</a>:</h4>
<p>then the interesting thing is to figure out how to print them out</p>



<a name="128616206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616206">(Jun 25 2018 at 18:50)</a>:</h4>
<p>er, cast too is probably good :)</p>



<a name="128616264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616264">(Jun 25 2018 at 18:50)</a>:</h4>
<p>I think we do want to distinguish some kind of "miscellaneous" category from the "boring" category</p>



<a name="128616271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616271">(Jun 25 2018 at 18:50)</a>:</h4>
<p>Alright, I can do that.</p>



<a name="128616272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616272">(Jun 25 2018 at 18:50)</a>:</h4>
<p>basically, each of these will become an underline, and I think there is probably some set of things that seem important but we can use a kind of generic label about "data flow" or something for now</p>



<a name="128616273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616273">(Jun 25 2018 at 18:50)</a>:</h4>
<p>casts may fall in this category to start</p>



<a name="128616283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616283">(Jun 25 2018 at 18:51)</a>:</h4>
<p>since there are many kinds of casts</p>



<a name="128616285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616285">(Jun 25 2018 at 18:51)</a>:</h4>
<p>and really we will want to separate them out</p>



<a name="128616295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616295">(Jun 25 2018 at 18:51)</a>:</h4>
<p>so coming back to the output I was vaguely hoping for:</p>
<div class="codehilite"><pre><span></span>error[E0495]: this data would have to have static lifetime
  --&gt; dyn-trait-underscore.rs:18:20
   |
16 |   fn a&lt;T&gt;(items: &amp;[T]) -&gt; Box&lt;dyn Iterator&lt;Item=&amp;T&gt;&gt; {
   |                  ---- fully elaborated type is `&amp;&#39;1 [T]`
18 |       Box::new(items.iter())
   |       ^^^^^^^^^^^^^^^^^^^^^^ casting this value to a `dyn Iterator` requires `&#39;1` to outlive `&#39;static`
19 |  }
</pre></div>



<a name="128616344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616344">(Jun 25 2018 at 18:52)</a>:</h4>
<p>Yeah, I wasn't sure how I'd transform the categorized constraints into something like that.</p>



<a name="128616588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616588">(Jun 25 2018 at 18:57)</a>:</h4>
<p>right so</p>



<a name="128616591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616591">(Jun 25 2018 at 18:57)</a>:</h4>
<p>there are a few parts</p>



<a name="128616637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616637">(Jun 25 2018 at 18:58)</a>:</h4>
<p>the "this data would have to have static lifetime" and "fully elaborated type" part</p>



<a name="128616642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616642">(Jun 25 2018 at 18:58)</a>:</h4>
<p>come from the original error</p>



<a name="128616649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616649">(Jun 25 2018 at 18:58)</a>:</h4>
<p>this part "casting this value to a <code>dyn Iterator</code> requires <code>'1</code> to outlive <code>'static</code>" comes from the constraint</p>



<a name="128616686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616686">(Jun 25 2018 at 18:59)</a>:</h4>
<p>( this is partly why i'd like to land something, as I think we could divide up these bits )</p>



<a name="128616690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616690">(Jun 25 2018 at 18:59)</a>:</h4>
<p>let's start with a simpler error which is closer to what we have...</p>



<a name="128616698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616698">(Jun 25 2018 at 18:59)</a>:</h4>
<p>I imagine something like this</p>



<a name="128616893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616893">(Jun 25 2018 at 19:02)</a>:</h4>
<div class="codehilite"><pre><span></span>error[E0495]: free region `` does not outlive free region `&#39;static`
  --&gt; dyn-trait-underscore.rs:18:20
   |
16 |   fn a&lt;T&gt;(items: &amp;[T]) -&gt; Box&lt;dyn Iterator&lt;Item=&amp;T&gt;&gt; {
   |                  ---- fully elaborated type is `&amp;&#39;1 [T]`
18 |       Box::new(items.iter())
   |       ^^^^^^^^^^^^^^^^^^^^^^ cast requires `` to outlive `&#39;static`
19 |  }
</pre></div>



<a name="128616908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616908">(Jun 25 2018 at 19:03)</a>:</h4>
<p>this doesn't improve some of the core issues</p>



<a name="128616920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616920">(Jun 25 2018 at 19:03)</a>:</h4>
<p>but basically for each MIR statement with a "category"</p>



<a name="128616926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616926">(Jun 25 2018 at 19:03)</a>:</h4>
<p>I can take a stab at that, it seems doable. Understanding which parts of the diagnostic comes from what helps.</p>



<a name="128616932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616932">(Jun 25 2018 at 19:03)</a>:</h4>
<p>we would summarize the category with something like "foo requires SUB to outlive SUP"</p>



<a name="128616936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616936">(Jun 25 2018 at 19:03)</a>:</h4>
<p>where foo depends on the category</p>



<a name="128616983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616983">(Jun 25 2018 at 19:04)</a>:</h4>
<p>then we can separately attack how SUB and SUP are displayed (e.g., the empty string aspect :)</p>



<a name="128616988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128616988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128616988">(Jun 25 2018 at 19:04)</a>:</h4>
<p>and also improving the categories and the wording thereof</p>



<a name="128617097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128617097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128617097">(Jun 25 2018 at 19:06)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="thumbs up">:thumbs_up:</span></p>



<a name="128681484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128681484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128681484">(Jun 26 2018 at 21:33)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> could you point me in the right direction with how I'd work out the span in your elaborated type label from the example? - can't figure out how to find that, it isn't one of the categorized spans.</p>
<div class="codehilite"><pre><span></span>error[E0495]: example
  --&gt; dyn-trait-underscore.rs:18:20
   |
16 |   fn a&lt;T&gt;(items: &amp;[T]) -&gt; Box&lt;dyn Iterator&lt;Item=&amp;T&gt;&gt; {
   |                  ---- this span right here
18 |       Box::new(items.iter())
   |
19 |  }
</pre></div>



<a name="128681622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128681622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128681622">(Jun 26 2018 at 21:36)</a>:</h4>
<p>ah, well, that's a tricky one</p>



<a name="128681627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128681627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128681627">(Jun 26 2018 at 21:36)</a>:</h4>
<p>I don't think I expected you to have that span for the first commit :)</p>



<a name="128681662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128681662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128681662">(Jun 26 2018 at 21:37)</a>:</h4>
<p>however, the way I would get it is to:</p>
<ul>
<li>search the list of argument types for the one that contains the region in question<ul>
<li>I think in practice this doesn't actually have to be unique, so let's say "the first one" for now</li>
</ul>
</li>
<li>once we know the index of the argument, look at the HIR and extract the span for that argument's type</li>
</ul>



<a name="128681664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128681664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128681664">(Jun 26 2018 at 21:37)</a>:</h4>
<p>I can point you at some similar code that does that</p>



<a name="128682405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682405">(Jun 26 2018 at 21:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  So far I've added the "Boring" category and the "Return" category that you suggested adding yesterday. And I've got the following error message:</p>
<div class="codehilite"><pre><span></span>error: Cast requires that data must outlive free region `&#39;static`
  --&gt; src/test/ui/underscore-lifetime/dyn-trait-underscore.rs:18:5
   |
18 |     Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
   |     ^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error
</pre></div>


<p>I'd ideally like to have something a little better for the PR (it doesn't quite match your "lets start with something like this" suggestion from yesterday), but I guess we could try land that (if it's good enough) so we can get more people involved in the tasks that span out from this one. I can always branch off of this and work on a follow-up PR of improvements so similar code would be helpful.</p>



<a name="128682410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682410">(Jun 26 2018 at 21:52)</a>:</h4>
<p>where did the "cast requires" come from?</p>



<a name="128682411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682411">(Jun 26 2018 at 21:53)</a>:</h4>
<p>That's the category that the constraint had.</p>



<a name="128682418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682418">(Jun 26 2018 at 21:53)</a>:</h4>
<p>and in this csae there is only 1? (in general there might be multiple, right?)</p>



<a name="128682426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682426">(Jun 26 2018 at 21:53)</a>:</h4>
<p>There are multiple, this is the one that sorted first - the others point to roughly the same span though.</p>



<a name="128682474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682474">(Jun 26 2018 at 21:54)</a>:</h4>
<p>Well, there are multiple constraint paths, this is the shortest path and the constraint category that sorted lowest/highest/whichever-it-is in that path.</p>



<a name="128682533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682533">(Jun 26 2018 at 21:55)</a>:</h4>
<p>It finds all the constraint paths from the region we're reporting an error from, it takes the shortest of those paths, categorizes the constraints (edges) and then sorts them by the category (<code>Ord</code> on <code>ConstraintCategory</code>) and then picks the first one as the primary span.</p>



<a name="128682690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682690">(Jun 26 2018 at 21:58)</a>:</h4>
<p>ok well regardless it seems like an improvement</p>



<a name="128682698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682698">(Jun 26 2018 at 21:58)</a>:</h4>
<p>and that probably makes sense</p>



<a name="128682703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682703">(Jun 26 2018 at 21:59)</a>:</h4>
<p>as a means of deciding what to "highlight" in the error</p>



<a name="128682710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682710">(Jun 26 2018 at 21:59)</a>:</h4>
<p>It's what past-you wanted.</p>



<a name="128682715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682715">(Jun 26 2018 at 21:59)</a>:</h4>
<p>eventually we might do something else but basically having <em>some</em> heuristic that picks a category</p>



<a name="128682721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682721">(Jun 26 2018 at 21:59)</a>:</h4>
<p>ah, past-me was smart ;)</p>



<a name="128682742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682742">(Jun 26 2018 at 21:59)</a>:</h4>
<p>or at least -- shocking! -- I seem to agree with past-me</p>



<a name="128682935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128682935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128682935">(Jun 26 2018 at 22:01)</a>:</h4>
<p>I'll check what tests it affects and then push the changes and see if I can't make Travis like this PR.</p>



<a name="128684306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128684306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128684306">(Jun 26 2018 at 22:32)</a>:</h4>
<p>Pushed the above.</p>



<a name="128734500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128734500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128734500">(Jun 27 2018 at 19:51)</a>:</h4>
<p>you around <span class="user-mention" data-user-id="116107">@David Wood</span> ?</p>



<a name="128734503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128734503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128734503">(Jun 27 2018 at 19:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yeah</p>



<a name="128734506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128734506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128734506">(Jun 27 2018 at 19:51)</a>:</h4>
<p>I am reviewing your PR</p>



<a name="128734509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128734509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128734509">(Jun 27 2018 at 19:51)</a>:</h4>
<p>one very minor nit:</p>



<a name="128734514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128734514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128734514">(Jun 27 2018 at 19:51)</a>:</h4>
<p>compiler error messages begin with a lower-case letter :)</p>



<a name="128734517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128734517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128734517">(Jun 27 2018 at 19:51)</a>:</h4>
<p>think you can quickly patch that?</p>



<a name="128734520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128734520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128734520">(Jun 27 2018 at 19:51)</a>:</h4>
<p>Yeah, sure thing.</p>



<a name="128735886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128735886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128735886">(Jun 27 2018 at 20:18)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Should have just fixed that.</p>



<a name="128735891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128735891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128735891">(Jun 27 2018 at 20:18)</a>:</h4>
<p>cool</p>



<a name="128786213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128786213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128786213">(Jun 28 2018 at 18:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> this branch has diverged so much from the current master.</p>



<a name="128786221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128786221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128786221">(Jun 28 2018 at 18:19)</a>:</h4>
<p>Particularly the interesting/boring categorization that I built on.</p>



<a name="128786273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128786273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128786273">(Jun 28 2018 at 18:20)</a>:</h4>
<p>Trying to tie these back together is painful.</p>



<a name="128786280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128786280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128786280">(Jun 28 2018 at 18:20)</a>:</h4>
<p>oh hmm</p>



<a name="128786282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128786282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128786282">(Jun 28 2018 at 18:20)</a>:</h4>
<p>/me tries to remember if he broke that</p>



<a name="128786286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128786286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128786286">(Jun 28 2018 at 18:20)</a>:</h4>
<p>I can try to rebase that part if you want</p>



<a name="128786289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128786289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128786289">(Jun 28 2018 at 18:20)</a>:</h4>
<p>I'd appreciate that.</p>



<a name="128786448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128786448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128786448">(Jun 28 2018 at 18:25)</a>:</h4>
<p>working on it</p>



<a name="128787663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128787663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128787663">(Jun 28 2018 at 18:49)</a>:</h4>
<p>heh yeah this is nasty</p>



<a name="128787681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128787681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128787681">(Jun 28 2018 at 18:49)</a>:</h4>
<p>I got about three commits in but then it just got too different.</p>



<a name="128788015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128788015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128788015">(Jun 28 2018 at 18:55)</a>:</h4>
<p>I have a rebased version that builds</p>



<a name="128788018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128788018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128788018">(Jun 28 2018 at 18:55)</a>:</h4>
<p>I am going to run tests and see what it does :)</p>



<a name="128788946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128788946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128788946">(Jun 28 2018 at 19:13)</a>:</h4>
<p>hmm something looks broken</p>
<div class="codehilite"><pre><span></span>test [ui] ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs has been running for over 60 seconds
test [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs has been running for over 60 seconds
test [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs has been running for over 60 seconds
test [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs has been running for over 60 seconds
test [ui] ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs has been running for over 60 seconds
test [ui] ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs has been running for over 60 seconds
test [ui] ui/nll/issue-50716.rs has been running for over 60 seconds
test [ui] ui/nll/ty-outlives/projection-one-region-closure.rs has been running for over 60 seconds
test [ui] ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs has been running for over 60 seconds
test [ui] ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs has been running for over 60 seconds
</pre></div>



<a name="128788951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128788951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128788951">(Jun 28 2018 at 19:13)</a>:</h4>
<p>I'm guessing this is going into an infinite loop</p>



<a name="128789013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128789013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128789013">(Jun 28 2018 at 19:14)</a>:</h4>
<p><span class="emoji emoji-2639" title="white frowning face">:white_frowning_face:</span></p>



<a name="128789159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128789159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128789159">(Jun 28 2018 at 19:18)</a>:</h4>
<p>investingating...</p>



<a name="128791660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791660">(Jun 28 2018 at 20:12)</a>:</h4>
<p>seems to be <code>find_constraint_paths_from_region</code></p>



<a name="128791668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791668">(Jun 28 2018 at 20:13)</a>:</h4>
<p>Oh, that's strange.</p>



<a name="128791687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791687">(Jun 28 2018 at 20:13)</a>:</h4>
<p>I thought it checked to avoid re-visiting regions?</p>



<a name="128791689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791689">(Jun 28 2018 at 20:13)</a>:</h4>
<p>sample from debug output</p>



<a name="128791694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791694">(Jun 28 2018 at 20:13)</a>:</h4>
<div class="codehilite"><pre><span></span>DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
DEBUG 2018-06-28T20:08:56Z: rustc_mir::borrow_check::nll::region_infer::error_reporting: find_constraint_paths_from_region: index=ConstraintIndex(30) region=Some(&#39;_#31r)
</pre></div>



<a name="128791748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791748">(Jun 28 2018 at 20:14)</a>:</h4>
<p>must be this loop</p>
<div class="codehilite"><pre><span></span><span class="w">            </span><span class="k">while</span><span class="w"> </span><span class="n">region</span><span class="p">.</span><span class="n">is_some</span><span class="p">()</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="n">region</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="n">r0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">previous</span><span class="p">.</span><span class="n">get</span><span class="p">(</span><span class="o">&amp;</span><span class="n">region</span><span class="p">.</span><span class="n">unwrap</span><span class="p">()).</span><span class="n">unwrap</span><span class="p">();</span><span class="w"></span>
<span class="w">                </span><span class="n">index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="mi">0</span><span class="p">;</span><span class="w"></span>
<span class="w">                </span><span class="n">region</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="mi">1</span><span class="p">;</span><span class="w"></span>

<span class="w">                </span><span class="n">debug</span><span class="o">!</span><span class="p">(</span><span class="s">&quot;find_constraint_paths_from_region: index={:?} region={:?}&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">index</span><span class="p">,</span><span class="w"> </span><span class="n">region</span><span class="p">);</span><span class="w"></span>
<span class="w">                </span><span class="n">path</span><span class="p">.</span><span class="n">push</span><span class="p">(</span><span class="n">index</span><span class="p">);</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="128791764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791764">(Jun 28 2018 at 20:14)</a>:</h4>
<p>I'm not really clear on why this should've changed</p>



<a name="128791775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791775">(Jun 28 2018 at 20:14)</a>:</h4>
<p>but we might be generating slightly different constraints than we did before</p>



<a name="128791778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791778">(Jun 28 2018 at 20:14)</a>:</h4>
<p>want me to push the rebase, and you can debug?</p>



<a name="128791784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791784">(Jun 28 2018 at 20:15)</a>:</h4>
<p>/me is doing that</p>



<a name="128791798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791798">(Jun 28 2018 at 20:15)</a>:</h4>
<p>Yeah, no problem.</p>



<a name="128791804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791804">(Jun 28 2018 at 20:15)</a>:</h4>
<p>I'm realizing how little I understand that code ;)</p>



<a name="128791808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791808">(Jun 28 2018 at 20:15)</a>:</h4>
<p>I mean I understand it at a high level</p>



<a name="128791810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128791810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128791810">(Jun 28 2018 at 20:15)</a>:</h4>
<p>:)</p>



<a name="128845123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128845123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128845123">(Jun 29 2018 at 19:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> how did this go? did you ever find the problem?</p>



<a name="128845330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128845330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128845330">(Jun 29 2018 at 19:14)</a>:</h4>
<p>I didn't get a chance yesterday. Building it now.</p>



<a name="128849001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128849001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128849001">(Jun 29 2018 at 20:31)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> what's the flag for graphviz output?</p>



<a name="128849005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128849005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128849005">(Jun 29 2018 at 20:31)</a>:</h4>
<p>Forgotten it.</p>



<a name="128849381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128849381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128849381">(Jun 29 2018 at 20:38)</a>:</h4>
<p>-Zdump_mir_graphviz ?</p>



<a name="128849414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128849414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128849414">(Jun 29 2018 at 20:39)</a>:</h4>
<p>I'd been doing <code>-Z dump-mir=all</code> and getting no <code>.dot</code> files, very confusing.</p>



<a name="128851139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128851139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128851139">(Jun 29 2018 at 21:23)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Pushed a fix to that infinite loop issue. Not ran _all_ the tests, but one that was infinite looping is no longer infinite looping.</p>



<a name="128853357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128853357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128853357">(Jun 29 2018 at 22:25)</a>:</h4>
<p>Well, as it turns out I should have ran all the tests.</p>



<a name="128854988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128854988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128854988">(Jun 29 2018 at 23:11)</a>:</h4>
<p>N-th time lucky.</p>



<a name="128923833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128923833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128923833">(Jul 01 2018 at 15:15)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Can you r+ the PR before I need to rebase again?</p>



<a name="128923838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128923838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128923838">(Jul 01 2018 at 15:15)</a>:</h4>
<p>er, yes, done</p>



<a name="128923839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128923839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128923839">(Jul 01 2018 at 15:15)</a>:</h4>
<p>I didn't get a chance to read that closely yet your latest changes, but it's ok</p>



<a name="128923880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128923880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128923880">(Jul 01 2018 at 15:16)</a>:</h4>
<p>There's been no changes other than rebasing and the infinite loop fix (which was just moving a line) since you last <code>r+</code>'d.</p>



<a name="128923936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128923936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128923936">(Jul 01 2018 at 15:18)</a>:</h4>
<p>ok</p>



<a name="128923937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128923937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128923937">(Jul 01 2018 at 15:18)</a>:</h4>
<p>it was the infinite loop fix I hadn't read :)</p>



<a name="128923946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128923946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128923946">(Jul 01 2018 at 15:19)</a>:</h4>
<p>I had to move when I considered a region visited in the DFS to before I looked at the edges going from it instead of after. This meant that if a region had a constraint to itself (which it must have had after the rebase) then it wouldn't cause an issue later when working out the paths.</p>



<a name="128931800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128931800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128931800">(Jul 01 2018 at 20:18)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Now that's merged, what are the next steps for it?</p>



<a name="128965451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128965451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128965451">(Jul 02 2018 at 14:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> good question! :) I'll try to prep an answer shortly, fits well with the planning I was hoping to do today</p>



<a name="128982749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982749">(Jul 02 2018 at 19:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> ok so I am noticing some mildly surprising behavior from the current region inference stuff</p>



<a name="128982754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982754">(Jul 02 2018 at 19:25)</a>:</h4>
<p>in particular it's not finding the "interesting constriants" I expect</p>



<a name="128982756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982756">(Jul 02 2018 at 19:25)</a>:</h4>
<p>in at least one test case :)</p>



<a name="128982759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982759">(Jul 02 2018 at 19:25)</a>:</h4>
<p>I may try to debug it, or else to leave a comment if you want to take a look</p>



<a name="128982763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982763">(Jul 02 2018 at 19:25)</a>:</h4>
<p>I'm trying to figure out how to manage this region error thing, there are a lot of moving parts</p>



<a name="128982828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982828">(Jul 02 2018 at 19:26)</a>:</h4>
<p>Oh, that's interesting.</p>



<a name="128982831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982831">(Jul 02 2018 at 19:26)</a>:</h4>
<p>so in particular I see this graph:</p>



<a name="128982834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982834">(Jul 02 2018 at 19:26)</a>:</h4>
<p><a href="/user_uploads/4715/mS5o31MuOgcXEaAdPoVR2JY7/Screen-Shot-2018-07-02-at-3.22.14-PM.png" target="_blank" title="Screen-Shot-2018-07-02-at-3.22.14-PM.png">Screen-Shot-2018-07-02-at-3.22.14-PM.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/mS5o31MuOgcXEaAdPoVR2JY7/Screen-Shot-2018-07-02-at-3.22.14-PM.png" target="_blank" title="Screen-Shot-2018-07-02-at-3.22.14-PM.png"><img src="/user_uploads/4715/mS5o31MuOgcXEaAdPoVR2JY7/Screen-Shot-2018-07-02-at-3.22.14-PM.png"></a></div>



<a name="128982841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982841">(Jul 02 2018 at 19:27)</a>:</h4>
<p>from the <code>borrowck/issue-45983.rs</code> test case</p>



<a name="128982845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982845">(Jul 02 2018 at 19:27)</a>:</h4>
<p>the two regions in question are <code>'_#2r</code> and <code>'_#3r</code></p>



<a name="128982848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982848">(Jul 02 2018 at 19:27)</a>:</h4>
<p>so it seems like the "interesting" one is bb0[2]</p>



<a name="128982850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982850">(Jul 02 2018 at 19:27)</a>:</h4>
<p>but right now we are .. not finding that</p>



<a name="128982853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982853">(Jul 02 2018 at 19:27)</a>:</h4>
<p>I can't quite figure out how to interpret the <code>debug!</code> output</p>



<a name="128982897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982897">(Jul 02 2018 at 19:28)</a>:</h4>
<p>I have to look at the code a bit more closely I think</p>



<a name="128982903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982903">(Jul 02 2018 at 19:28)</a>:</h4>
<p>anyway, that <em>is</em> the right answer it turns out</p>



<a name="128982909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128982909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128982909">(Jul 02 2018 at 19:28)</a>:</h4>
<p>(I'm writing up some comments about how to handle the closure errors, and this is the test case I am looking at)</p>



<a name="128983019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983019">(Jul 02 2018 at 19:31)</a>:</h4>
<p>For that to be a boring region, doesn't that mean it acts on a temporary?</p>



<a name="128983468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983468">(Jul 02 2018 at 19:41)</a>:</h4>
<p>hmm perhaps that is the problem</p>



<a name="128983470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983470">(Jul 02 2018 at 19:41)</a>:</h4>
<p>some notes here:</p>
<p><a href="https://github.com/rust-lang/rust/issues/51027#issuecomment-401912102" target="_blank" title="https://github.com/rust-lang/rust/issues/51027#issuecomment-401912102">https://github.com/rust-lang/rust/issues/51027#issuecomment-401912102</a></p>



<a name="128983472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983472">(Jul 02 2018 at 19:42)</a>:</h4>
<p>on the closure problem anyway</p>



<a name="128983516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983516">(Jul 02 2018 at 19:42)</a>:</h4>
<p>I want to turn my attention back to the dyn-underscore problem now — I feel like we're getting close to a more "unified region error reporting" thing but I don't quite see it yet :)</p>



<a name="128983522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983522">(Jul 02 2018 at 19:42)</a>:</h4>
<p>that said, I should probably take what little time I have left today (grr, that took forever to dig into) and focus on finding some lower hanging fruit</p>



<a name="128983529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983529">(Jul 02 2018 at 19:42)</a>:</h4>
<p>I dont' really have much idea what issues to highlight just now...</p>



<a name="128983639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983639">(Jul 02 2018 at 19:45)</a>:</h4>
<p>jfyi the assignment is writing to</p>
<div class="codehilite"><pre><span></span>(*(_1.0: &amp;&#39;_#5r mut std::option::Option&lt;&amp;&#39;_#6r ()&gt;))
</pre></div>


<p>where <code>_1.0</code> is an upvar field projection</p>



<a name="128983692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983692">(Jul 02 2018 at 19:46)</a>:</h4>
<p>That's a captured variable in a closure, right?</p>



<a name="128983700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983700">(Jul 02 2018 at 19:47)</a>:</h4>
<p>Is there a way to check if something is a upvar before considering it boring?</p>



<a name="128983839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983839">(Jul 02 2018 at 19:51)</a>:</h4>
<p>ultimately I think the boring idea was not the right one, on my part</p>



<a name="128983841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983841">(Jul 02 2018 at 19:51)</a>:</h4>
<p>that is, I think we should just use the categorization later on</p>



<a name="128983844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983844">(Jul 02 2018 at 19:51)</a>:</h4>
<p>and deciding boring/interesting then</p>



<a name="128983847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983847">(Jul 02 2018 at 19:51)</a>:</h4>
<p>I don't think there is any context that we have in the beginning</p>



<a name="128983848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983848">(Jul 02 2018 at 19:51)</a>:</h4>
<p>which we lack later on</p>



<a name="128983892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983892">(Jul 02 2018 at 19:52)</a>:</h4>
<p>in any case, yes, it is easy to tell upvar projections</p>



<a name="128983904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128983904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128983904">(Jul 02 2018 at 19:52)</a>:</h4>
<p>Perhaps that's a decent small next step?</p>



<a name="128984209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128984209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128984209">(Jul 02 2018 at 20:00)</a>:</h4>
<p>perhaps so</p>



<a name="128984220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128984220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128984220">(Jul 02 2018 at 20:00)</a>:</h4>
<p>are you interested in poking at the closure stuff? you might try skimming those notes</p>



<a name="128984222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128984222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128984222">(Jul 02 2018 at 20:00)</a>:</h4>
<p>and see if they make some measure of sense to you :)</p>



<a name="128984249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/128984249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#128984249">(Jul 02 2018 at 20:01)</a>:</h4>
<p>I'll take a look when I've got a moment.</p>



<a name="129011924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129011924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129011924">(Jul 03 2018 at 09:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> so I'm taking a closer look at the region error reporting code on master and doing a bit of experimentation</p>



<a name="129011926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129011926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129011926">(Jul 03 2018 at 09:12)</a>:</h4>
<p>jfyi</p>



<a name="129011934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129011934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129011934">(Jul 03 2018 at 09:13)</a>:</h4>
<p>I noticed (to start) some opportunities for cleanup, so I might just open a cleanup PR and r? you</p>



<a name="129011942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129011942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129011942">(Jul 03 2018 at 09:13)</a>:</h4>
<p>Sounds good, there's likely plenty of room for improvement.</p>



<a name="129029742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129029742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129029742">(Jul 03 2018 at 15:30)</a>:</h4>
<p><span class="user-mention" data-user-id="116107">@David Wood</span> ok I have some progress, gonna open a PR soon</p>



<a name="129030008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030008">(Jul 03 2018 at 15:34)</a>:</h4>
<p>e.g., output for <code>issue-45983.rs</code> is:</p>
<div class="codehilite"><pre><span></span>error: unsatisfied lifetime constraints
  --&gt; borrowck/issue-45983.rs:17:18
   |
16 |     let x = None;
   |         - region `&#39;2` appears in the type of `x`
17 |     give_any(|y| x = Some(y));
   |               -  ^^^^^^^^^^^ free region requires that `&#39;1` must outlive `&#39;2`
   |               |
   |               region `&#39;1` appears in this argument
</pre></div>



<a name="129030012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030012">(Jul 03 2018 at 15:34)</a>:</h4>
<p>(that's one of the closure ones)</p>



<a name="129030034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030034">(Jul 03 2018 at 15:34)</a>:</h4>
<p>the "region <code>'2</code> appears in the type of <code>x</code>" message was intended to eventually become something like "fully elaborated type of <code>x</code> is ..."</p>



<a name="129030052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030052">(Jul 03 2018 at 15:35)</a>:</h4>
<p>obviously this is not specialized to closures at all</p>



<a name="129030117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030117">(Jul 03 2018 at 15:36)</a>:</h4>
<p>the <code>dyn-trait-underscore</code> is printing:</p>
<div class="codehilite"><pre><span></span>error: unsatisfied lifetime constraints
  --&gt; underscore-lifetime/dyn-trait-underscore.rs:18:5
   |
16 | fn a&lt;T&gt;(items: &amp;[T]) -&gt; Box&lt;dyn Iterator&lt;Item=&amp;T&gt;&gt; {
   |         ----- region `&#39;1` appears in this argument
17 |     Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
   |     ^^^^^^^^^^^^^^^^^^^^^^ cast requires that `&#39;1` must outlive `&#39;static`
</pre></div>



<a name="129030129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030129">(Jul 03 2018 at 15:36)</a>:</h4>
<p>which is ... kinda good :)</p>



<a name="129030131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030131">(Jul 03 2018 at 15:36)</a>:</h4>
<p>it'd be nice to underline the return type, didn't get to <em>that</em> yet</p>



<a name="129030137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030137">(Jul 03 2018 at 15:36)</a>:</h4>
<p>that'd be some more special cases</p>



<a name="129030143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030143">(Jul 03 2018 at 15:36)</a>:</h4>
<p>my goal though is to get something where we can make smaller PRs adding various special cases :)</p>



<a name="129030275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030275">(Jul 03 2018 at 15:38)</a>:</h4>
<p>this might be a perfect place for an error code actually</p>



<a name="129030281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030281">(Jul 03 2018 at 15:38)</a>:</h4>
<p>that is, maybe we can explain "how to read this error", once we get closer</p>



<a name="129030306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129030306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129030306">(Jul 03 2018 at 15:38)</a>:</h4>
<p>hopefully we can get it good enough that — with a bit of guidance — mere mortals can actually <em>do so</em></p>



<a name="129032371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032371">(Jul 03 2018 at 16:10)</a>:</h4>
<p>That certainly simplifies what I had for finding paths.</p>



<a name="129032383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032383">(Jul 03 2018 at 16:11)</a>:</h4>
<p>In the most recent example you've sent here, I think we need to break down "cast" more - it's not obvious (at least to me) that what is being highlighted is a cast (from a end-user reading their code perspective).</p>



<a name="129032385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032385">(Jul 03 2018 at 16:11)</a>:</h4>
<p>presuming that <a href="https://github.com/rust-lang/rust/pull/51987" target="_blank" title="https://github.com/rust-lang/rust/pull/51987">https://github.com/rust-lang/rust/pull/51987</a> turns out to be a win,</p>



<a name="129032388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032388">(Jul 03 2018 at 16:11)</a>:</h4>
<p>the code likely gets simpler still</p>



<a name="129032391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032391">(Jul 03 2018 at 16:11)</a>:</h4>
<p>since we can just walk the tree of constraints...</p>



<a name="129032437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032437">(Jul 03 2018 at 16:12)</a>:</h4>
<p>yes, that's Yet Another orthogonal sort of problem</p>



<a name="129032439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032439">(Jul 03 2018 at 16:12)</a>:</h4>
<p>but a tricky one</p>



<a name="129032452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032452">(Jul 03 2018 at 16:12)</a>:</h4>
<p>it's particularly not obvious here I guess</p>



<a name="129032457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032457">(Jul 03 2018 at 16:12)</a>:</h4>
<p>since the "cast" is an implicit coercion</p>



<a name="129032462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032462">(Jul 03 2018 at 16:12)</a>:</h4>
<p>we need to thread more information through there</p>



<a name="129032466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032466">(Jul 03 2018 at 16:12)</a>:</h4>
<p>still, you gotta remember the competition for this particular error :)</p>



<a name="129032484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032484">(Jul 03 2018 at 16:13)</a>:</h4>
<div class="codehilite"><pre><span></span>error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
  --&gt; underscore-lifetime/dyn-trait-underscore.rs:18:20
   |
18 |     Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
   |                    ^^^^
   |
note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the function body at 16:1...
  --&gt; underscore-lifetime/dyn-trait-underscore.rs:16:1
   |
16 | / fn a&lt;T&gt;(items: &amp;[T]) -&gt; Box&lt;dyn Iterator&lt;Item=&amp;T&gt;&gt; {
17 | |     //                      ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `&#39;static`
18 | |     Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
19 | | }
   | |_^
note: ...so that reference does not outlive borrowed content
  --&gt; underscore-lifetime/dyn-trait-underscore.rs:18:14
   |
18 |     Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
   |              ^^^^^
   = note: but, the lifetime must be valid for the static lifetime...
   = note: ...so that the expression is assignable:
           expected std::boxed::Box&lt;(dyn std::iter::Iterator&lt;Item=&amp;T&gt; + &#39;static)&gt;
              found std::boxed::Box&lt;dyn std::iter::Iterator&lt;Item=&amp;T&gt;&gt;
</pre></div>



<a name="129032487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032487">(Jul 03 2018 at 16:13)</a>:</h4>
<p>not exactly super comprehensible</p>



<a name="129032489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032489">(Jul 03 2018 at 16:13)</a>:</h4>
<p>The first example you gave with the closure is much improved.</p>



<a name="129032501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032501">(Jul 03 2018 at 16:13)</a>:</h4>
<p>Yeah, just naming the regions is a significant improvement.</p>



<a name="129032553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032553">(Jul 03 2018 at 16:14)</a>:</h4>
<p>that said,</p>



<a name="129032557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032557">(Jul 03 2018 at 16:14)</a>:</h4>
<p>it is interesting that this one</p>



<a name="129032561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032561">(Jul 03 2018 at 16:14)</a>:</h4>
<p>highlights the <em>source</em> more</p>



<a name="129032568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032568">(Jul 03 2018 at 16:14)</a>:</h4>
<p>i.e., the <code>items</code></p>



<a name="129032570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032570">(Jul 03 2018 at 16:14)</a>:</h4>
<p>and not the cast</p>



<a name="129032573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032573">(Jul 03 2018 at 16:14)</a>:</h4>
<p>we can do that too</p>



<a name="129032578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032578">(Jul 03 2018 at 16:14)</a>:</h4>
<p>another follow-up :)</p>



<a name="129032587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/ui/underscore-lifetime/dyn-trait-underscore.rs/near/129032587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/ui.2Funderscore-lifetime.2Fdyn-trait-underscore.2Ers.html#129032587">(Jul 03 2018 at 16:14)</a>:</h4>
<p>it basically all comes down to using more of the information in that causal chain</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>